package com.shf.film.flex;

import org.springframework.flex.config.MessageBrokerConfigProcessor;

import flex.messaging.MessageBroker;
import flex.messaging.services.RemotingService;

public class MyMessageBrokerConfigProcessor implements MessageBrokerConfigProcessor {

	@Override
	public MessageBroker processAfterStartup(MessageBroker broker) {
		RemotingService remotingService = 
	            (RemotingService) broker.getServiceByType(RemotingService.class.getName());
	        if (remotingService.isStarted()) {
	            System.out.println("The Remoting Service has been started with "
	                    +remotingService.getDestinations().size()+" Destinations.");
	        }
	        System.out.println("调用自定义处理!");
	        return broker;
	}

	@Override
	public MessageBroker processBeforeStartup(MessageBroker broker) {
		System.out.println("处理前!");
		return broker;
	}

}
